package org.ali.structuralpattern.decoratorpattern.decorator;

import org.ali.structuralpattern.decoratorpattern.shape.Shape;

/**
 * 装饰器
 */
public abstract class ShapeDecorator implements Shape {
    protected Shape shape;

    public ShapeDecorator(Shape shape) {
        this.shape = shape;
    }

    @Override
    public void draw() {
        shape.draw();
        paint();
    }

    /**
     * 上色
     */
    abstract void paint();
}